﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Shweet.Repository
{
    public class Team : IEquatable<Team>
    {
        public string Name { get; set; }
        public bool Following { get; set; }
        public string Url { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null)
                return false;

            Team a = obj as Team;
            if ((Object)a == null)
                return false;

            return (this.Name == a.Name) && (this.Url == a.Url);
        }

        public bool Equals(Team a)
        {
            return (this.Name == a.Name) && (this.Url == a.Url);
        }

        public override int GetHashCode()
        {
            return this.Name.GetHashCode() ^ this.Url.GetHashCode();
        }
    }
}
